3.5 \(\int \frac {1}{a+b \coth ^2(c+d x)} \, dx\)

Optimal. Leaf size=46 \[ \frac {x}{a+b}-\frac {\sqrt {b} \tan ^{-1}\left (\frac {\sqrt {a} \tanh (c+d x)}{\sqrt {b}}\right )}{\sqrt {a} d (a+b)} \]

[Out]

x/(a+b)-arctan(a^(1/2)*tanh(d*x+c)/b^(1/2))*b^(1/2)/(a+b)/d/a^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.08, antiderivative size = 46, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {3660, 3675, 205} \[ \frac {x}{a+b}-\frac {\sqrt {b} \tan ^{-1}\left (\frac {\sqrt {a} \tanh (c+d x)}{\sqrt {b}}\right )}{\sqrt {a} d (a+b)} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Coth[c + d*x]^2)^(-1),x]

[Out]

x/(a + b) - (Sqrt[b]*ArcTan[(Sqrt[a]*Tanh[c + d*x])/Sqrt[b]])/(Sqrt[a]*(a + b)*d)

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 3660

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]^2)^(-1), x_Symbol] :> Simp[x/(a - b), x] - Dist[b/(a - b), Int[Sec[e
 + f*x]^2/(a + b*Tan[e + f*x]^2), x], x] /; FreeQ[{a, b, e, f}, x] && NeQ[a, b]

Rule 3675

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_)])^(n_))^(p_.), x_Symbol] :> With[
{ff = FreeFactors[Tan[e + f*x], x]}, Dist[ff/(c^(m - 1)*f), Subst[Int[(c^2 + ff^2*x^2)^(m/2 - 1)*(a + b*(ff*x)
^n)^p, x], x, (c*Tan[e + f*x])/ff], x]] /; FreeQ[{a, b, c, e, f, n, p}, x] && IntegerQ[m/2] && (IntegersQ[n, p
] || IGtQ[m, 0] || IGtQ[p, 0] || EqQ[n^2, 4] || EqQ[n^2, 16])

Rubi steps

\begin {align*} \int \frac {1}{a+b \coth ^2(c+d x)} \, dx &=\frac {x}{a+b}-\frac {b \int \frac {\text {csch}^2(c+d x)}{a+b \coth ^2(c+d x)} \, dx}{a+b}\\ &=\frac {x}{a+b}+\frac {b \operatorname {Subst}\left (\int \frac {1}{a+b x^2} \, dx,x,\coth (c+d x)\right )}{(a+b) d}\\ &=\frac {x}{a+b}-\frac {\sqrt {b} \tan ^{-1}\left (\frac {\sqrt {a} \tanh (c+d x)}{\sqrt {b}}\right )}{\sqrt {a} (a+b) d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.06, size = 47, normalized size = 1.02 \[ \frac {\tanh ^{-1}(\tanh (c+d x))-\frac {\sqrt {b} \tan ^{-1}\left (\frac {\sqrt {a} \tanh (c+d x)}{\sqrt {b}}\right )}{\sqrt {a}}}{d (a+b)} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Coth[c + d*x]^2)^(-1),x]

[Out]

(-((Sqrt[b]*ArcTan[(Sqrt[a]*Tanh[c + d*x])/Sqrt[b]])/Sqrt[a]) + ArcTanh[Tanh[c + d*x]])/((a + b)*d)

________________________________________________________________________________________

fricas [B]  time = 0.43, size = 488, normalized size = 10.61 \[ \left [\frac {2 \, d x + \sqrt {-\frac {b}{a}} \log \left (\frac {{\left (a^{2} + 2 \, a b + b^{2}\right )} \cosh \left (d x + c\right )^{4} + 4 \, {\left (a^{2} + 2 \, a b + b^{2}\right )} \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + {\left (a^{2} + 2 \, a b + b^{2}\right )} \sinh \left (d x + c\right )^{4} - 2 \, {\left (a^{2} - b^{2}\right )} \cosh \left (d x + c\right )^{2} + 2 \, {\left (3 \, {\left (a^{2} + 2 \, a b + b^{2}\right )} \cosh \left (d x + c\right )^{2} - a^{2} + b^{2}\right )} \sinh \left (d x + c\right )^{2} + a^{2} - 6 \, a b + b^{2} + 4 \, {\left ({\left (a^{2} + 2 \, a b + b^{2}\right )} \cosh \left (d x + c\right )^{3} - {\left (a^{2} - b^{2}\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right ) - 4 \, {\left ({\left (a^{2} + a b\right )} \cosh \left (d x + c\right )^{2} + 2 \, {\left (a^{2} + a b\right )} \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + {\left (a^{2} + a b\right )} \sinh \left (d x + c\right )^{2} - a^{2} + a b\right )} \sqrt {-\frac {b}{a}}}{{\left (a + b\right )} \cosh \left (d x + c\right )^{4} + 4 \, {\left (a + b\right )} \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + {\left (a + b\right )} \sinh \left (d x + c\right )^{4} - 2 \, {\left (a - b\right )} \cosh \left (d x + c\right )^{2} + 2 \, {\left (3 \, {\left (a + b\right )} \cosh \left (d x + c\right )^{2} - a + b\right )} \sinh \left (d x + c\right )^{2} + 4 \, {\left ({\left (a + b\right )} \cosh \left (d x + c\right )^{3} - {\left (a - b\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right ) + a + b}\right )}{2 \, {\left (a + b\right )} d}, \frac {d x - \sqrt {\frac {b}{a}} \arctan \left (\frac {{\left ({\left (a + b\right )} \cosh \left (d x + c\right )^{2} + 2 \, {\left (a + b\right )} \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + {\left (a + b\right )} \sinh \left (d x + c\right )^{2} - a + b\right )} \sqrt {\frac {b}{a}}}{2 \, b}\right )}{{\left (a + b\right )} d}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+b*coth(d*x+c)^2),x, algorithm="fricas")

[Out]

[1/2*(2*d*x + sqrt(-b/a)*log(((a^2 + 2*a*b + b^2)*cosh(d*x + c)^4 + 4*(a^2 + 2*a*b + b^2)*cosh(d*x + c)*sinh(d
*x + c)^3 + (a^2 + 2*a*b + b^2)*sinh(d*x + c)^4 - 2*(a^2 - b^2)*cosh(d*x + c)^2 + 2*(3*(a^2 + 2*a*b + b^2)*cos
h(d*x + c)^2 - a^2 + b^2)*sinh(d*x + c)^2 + a^2 - 6*a*b + b^2 + 4*((a^2 + 2*a*b + b^2)*cosh(d*x + c)^3 - (a^2
- b^2)*cosh(d*x + c))*sinh(d*x + c) - 4*((a^2 + a*b)*cosh(d*x + c)^2 + 2*(a^2 + a*b)*cosh(d*x + c)*sinh(d*x +
c) + (a^2 + a*b)*sinh(d*x + c)^2 - a^2 + a*b)*sqrt(-b/a))/((a + b)*cosh(d*x + c)^4 + 4*(a + b)*cosh(d*x + c)*s
inh(d*x + c)^3 + (a + b)*sinh(d*x + c)^4 - 2*(a - b)*cosh(d*x + c)^2 + 2*(3*(a + b)*cosh(d*x + c)^2 - a + b)*s
inh(d*x + c)^2 + 4*((a + b)*cosh(d*x + c)^3 - (a - b)*cosh(d*x + c))*sinh(d*x + c) + a + b)))/((a + b)*d), (d*
x - sqrt(b/a)*arctan(1/2*((a + b)*cosh(d*x + c)^2 + 2*(a + b)*cosh(d*x + c)*sinh(d*x + c) + (a + b)*sinh(d*x +
 c)^2 - a + b)*sqrt(b/a)/b))/((a + b)*d)]

________________________________________________________________________________________

giac [A]  time = 0.13, size = 65, normalized size = 1.41 \[ -\frac {\frac {b \arctan \left (\frac {a e^{\left (2 \, d x + 2 \, c\right )} + b e^{\left (2 \, d x + 2 \, c\right )} - a + b}{2 \, \sqrt {a b}}\right )}{\sqrt {a b} {\left (a + b\right )}} - \frac {d x + c}{a + b}}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+b*coth(d*x+c)^2),x, algorithm="giac")

[Out]

-(b*arctan(1/2*(a*e^(2*d*x + 2*c) + b*e^(2*d*x + 2*c) - a + b)/sqrt(a*b))/(sqrt(a*b)*(a + b)) - (d*x + c)/(a +
 b))/d

________________________________________________________________________________________

maple [A]  time = 0.12, size = 76, normalized size = 1.65 \[ -\frac {\ln \left (\coth \left (d x +c \right )-1\right )}{d \left (2 b +2 a \right )}+\frac {\ln \left (\coth \left (d x +c \right )+1\right )}{d \left (2 b +2 a \right )}+\frac {b \arctan \left (\frac {\coth \left (d x +c \right ) b}{\sqrt {a b}}\right )}{d \left (a +b \right ) \sqrt {a b}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(a+b*coth(d*x+c)^2),x)

[Out]

-1/d/(2*b+2*a)*ln(coth(d*x+c)-1)+1/d/(2*b+2*a)*ln(coth(d*x+c)+1)+1/d*b/(a+b)/(a*b)^(1/2)*arctan(coth(d*x+c)*b/
(a*b)^(1/2))

________________________________________________________________________________________

maxima [A]  time = 0.42, size = 56, normalized size = 1.22 \[ \frac {b \arctan \left (\frac {{\left (a + b\right )} e^{\left (-2 \, d x - 2 \, c\right )} - a + b}{2 \, \sqrt {a b}}\right )}{\sqrt {a b} {\left (a + b\right )} d} + \frac {d x + c}{{\left (a + b\right )} d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+b*coth(d*x+c)^2),x, algorithm="maxima")

[Out]

b*arctan(1/2*((a + b)*e^(-2*d*x - 2*c) - a + b)/sqrt(a*b))/(sqrt(a*b)*(a + b)*d) + (d*x + c)/((a + b)*d)

________________________________________________________________________________________

mupad [B]  time = 0.11, size = 37, normalized size = 0.80 \[ \frac {x}{a+b}+\frac {b\,\mathrm {atan}\left (\frac {b\,\mathrm {coth}\left (c+d\,x\right )}{\sqrt {a\,b}}\right )}{d\,\sqrt {a\,b}\,\left (a+b\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(a + b*coth(c + d*x)^2),x)

[Out]

x/(a + b) + (b*atan((b*coth(c + d*x))/(a*b)^(1/2)))/(d*(a*b)^(1/2)*(a + b))

________________________________________________________________________________________

sympy [A]  time = 9.72, size = 294, normalized size = 6.39 \[ \begin {cases} \frac {\tilde {\infty } x}{\coth ^{2}{\relax (c )}} & \text {for}\: a = 0 \wedge b = 0 \wedge d = 0 \\- \frac {d x \tanh ^{2}{\left (c + d x \right )}}{2 b d \tanh ^{2}{\left (c + d x \right )} - 2 b d} + \frac {d x}{2 b d \tanh ^{2}{\left (c + d x \right )} - 2 b d} - \frac {\tanh {\left (c + d x \right )}}{2 b d \tanh ^{2}{\left (c + d x \right )} - 2 b d} & \text {for}\: a = - b \\\frac {x}{a} & \text {for}\: b = 0 \\\frac {x}{a + b \coth ^{2}{\relax (c )}} & \text {for}\: d = 0 \\\frac {x - \frac {\tanh {\left (c + d x \right )}}{d}}{b} & \text {for}\: a = 0 \\\frac {2 i a \sqrt {b} d x \sqrt {\frac {1}{a}}}{2 i a^{2} \sqrt {b} d \sqrt {\frac {1}{a}} + 2 i a b^{\frac {3}{2}} d \sqrt {\frac {1}{a}}} - \frac {b \log {\left (- i \sqrt {b} \sqrt {\frac {1}{a}} + \tanh {\left (c + d x \right )} \right )}}{2 i a^{2} \sqrt {b} d \sqrt {\frac {1}{a}} + 2 i a b^{\frac {3}{2}} d \sqrt {\frac {1}{a}}} + \frac {b \log {\left (i \sqrt {b} \sqrt {\frac {1}{a}} + \tanh {\left (c + d x \right )} \right )}}{2 i a^{2} \sqrt {b} d \sqrt {\frac {1}{a}} + 2 i a b^{\frac {3}{2}} d \sqrt {\frac {1}{a}}} & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+b*coth(d*x+c)**2),x)

[Out]

Piecewise((zoo*x/coth(c)**2, Eq(a, 0) & Eq(b, 0) & Eq(d, 0)), (-d*x*tanh(c + d*x)**2/(2*b*d*tanh(c + d*x)**2 -
 2*b*d) + d*x/(2*b*d*tanh(c + d*x)**2 - 2*b*d) - tanh(c + d*x)/(2*b*d*tanh(c + d*x)**2 - 2*b*d), Eq(a, -b)), (
x/a, Eq(b, 0)), (x/(a + b*coth(c)**2), Eq(d, 0)), ((x - tanh(c + d*x)/d)/b, Eq(a, 0)), (2*I*a*sqrt(b)*d*x*sqrt
(1/a)/(2*I*a**2*sqrt(b)*d*sqrt(1/a) + 2*I*a*b**(3/2)*d*sqrt(1/a)) - b*log(-I*sqrt(b)*sqrt(1/a) + tanh(c + d*x)
)/(2*I*a**2*sqrt(b)*d*sqrt(1/a) + 2*I*a*b**(3/2)*d*sqrt(1/a)) + b*log(I*sqrt(b)*sqrt(1/a) + tanh(c + d*x))/(2*
I*a**2*sqrt(b)*d*sqrt(1/a) + 2*I*a*b**(3/2)*d*sqrt(1/a)), True))

________________________________________________________________________________________